#pragma once
#ifndef TEXT_H_
#define TEXT_H_

#include "graphicsobject.h"

namespace EPOC
{
	class GraphicsManager;

	class Text : public GraphicsObject
	{
	public:
		Text(GraphicsManager *pGraphicsManager);
		virtual ~Text();

		virtual void Cleanup();
		
		virtual bool Load(std::string sFontPath, int nFontSize);
		virtual void SetText(std::string sText);
		virtual void ClearText();

	//public helpers
		inline void SetFont(TTF_Font *pFont) { m_pFont = pFont;}
		inline std::string GetText() { return m_sText;}
		inline void SetTextColor(ColorRGB rColor) { m_rTextColor = rColor; }

	protected:
		virtual SDL_Surface* RenderTextToSurface();
		virtual void RenderSDL( TextureSDL *pDestTexture);
		virtual void RenderOGL( );

	protected:
		bool m_pRebuildTexture;
		
		int m_nFontSize;

		std::string m_sText;
		std::string m_sFilePath;
		
		TTF_Font *m_pFont;
		ColorRGB m_rTextColor;
		GraphicsManager *m_pGraphicsManager;
	
	}; // class Text
}; // namespace EPOC

#endif